//1.引入vue 和 vue-router
import Vue from 'vue'
import Router from "vue-router"
Vue.use(Router)

import login from "../pages/login.vue"
import home from "../pages/home.vue"
import register from "../pages/register.vue"

export default new Router({
    //必须是routes
    routes:[
      {
        path:"/login",
        component:login
      },
      {
        path:"/home",
        component:home
      },
      {
        path:"/register",
        component:register
      },
      //重定向
      {
        path:"*",
        component:home
      }
    ]
  })